import React from "react";


export default function Count() {

    const incrementHandle = () => {

    }
    const decrementHandle = () => {

    }
    const ifOddDecrementHandle = () => {

    }
    const waitDecrementHandle = () => {

    }

    return (
        <div>
            <h1>我是Count组件,我的值是{ }</h1>
            <div>
                <button onClick={incrementHandle} >累加</button>
                <button onClick={decrementHandle}>累减</button>
                <button onClick={ifOddDecrementHandle}>如果是奇数再加1</button>
                <button onClick={waitDecrementHandle}>等2s再加1</button>
            </div>
        </div>
    )
}


//1.这里有一个Count组件,我们需要点击对应的button按钮改变初始值,并共享给Movie组件
//首先给每一个按钮绑定点击事件,然后定义事件函数.

//2.组件准备好之后我们就需要用到store了
// 2.1在src下创建store文件夹,下载store 的包